package org.chinacareer.position.config;

import org.springframework.stereotype.Component;

import com.netflix.loadbalancer.PollingServerListUpdater;

/**
 * @author jerry
 * @ClassName:  MyPollingServerListUpdater   
 * @Description:TODO(描述这个类的作用)   
 * @date 2022年12月1日 下午3:09:10
 */
@Component("ribbonServerListUpdater")
public class MyPollingServerListUpdater extends PollingServerListUpdater {

	private UpdateAction updateAction;

	@Override
	public synchronized void start(UpdateAction updateAction) {
		this.updateAction = updateAction;
//        super.start(updateAction);
		this.updateAction.doUpdate();
	}

	public UpdateAction getUpdateAction() {
		return updateAction;
	}
}
